//调用接口配置文件
import { request } from 'config/request'
import config from 'config/config'
// 定义接口

//新增
export async function addFun(params) {
    return request({
        url: `${config.aheadPlan}admin/productType/productType/add`,
        method: 'POST',
        data: params,
    });
  };

//查询主数据
export async function getTreeData(params) {
    return request({
        url: `${config.aheadPlan}admin/productType/productType/sendHttp`,
        method: 'GET',
        data: params,
    });
  };

// 查询左侧表格
export async function getAllProductType(params) {
  return request({
      url: `${config.aheadPlan}admin/productType/productType/getAllProductType`,
      method: 'GET',
      data: params,
  });
};
// 查询详情
export async function queryInfo(params) {
  return request({
      url: `${config.aheadPlan}admin/productType/productType/queryById`,
      method: 'GET',
      data: params,
  });
};
// 删除接口
export async function deleteFun(params) {
  return request({
      url: `${config.aheadPlan}admin/productType/productType/deleteTab`,
      method: 'DELETE',
      data: params,
  });
};